Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

META | DietPi-Image: Create from disk or shrink an image file #2693

Closed
wants to merge 6 commits into from

Conversation

MichaIng
Copy link
Owner

@MichaIng MichaIng commented Apr 6, 2019

Status: WIP

ToDo:

  • [ ] Clean tmpfs mount directories. In most cases there are obsolete files inside. Although this can be done as well during DietPi-PREP (mount root dev to tmp mount point, clean, umount).
    => DietPi-PREP task
  • Check whether shrink loop can be replaced with only resize2fs loop. During some test running resize2fs 3 times resulted on a bid smaller file system. The 4th loop didn't change something anymore.
  • @Fourdee: Which device actually requires RK_SINGLE_IMG (your script) so that the file system is written directly to the drive without partition table?
  • @Fourdee: Do I get is right that GPT partitions require gdisk to run (initially and after shrink has finished), then without any actual change press w (write) and y (confirm)? So then this could be automated as well.
  • Retest script with another image and see if in some circumstances the UUID of the resulting image file changes. In my case it did after many back and forth creation steps. But possibly I simply mounted the actual drive and image drive in parallel with identical UUIDs and the system automatically corrected this. Otherwise: tune2fs -U <UUID_of_initial_root_partition> $ROOT_DEV
  • Automatic hash creation and 7z compression?
  • Root partition as ALWAYS the last partition, right? Then we could automate root partition number estimation as well, skipping the input.

Reference: #2026 (comment)

Commit list/description:

  • DietPi-Image | Create from disk or shrink an image file

@MichaIng MichaIng added Installer 💠 Issues related to DietPi-Installer and/or pre-image used META Everything that is not code related, e.g. GitHub, Wiki, website, community labels Apr 6, 2019
@MichaIng MichaIng added this to the v6.23 milestone Apr 6, 2019
@MichaIng MichaIng self-assigned this Apr 6, 2019
@MichaIng MichaIng requested a review from Fourdee April 6, 2019 17:58
@MichaIng MichaIng modified the milestones: v6.23, Planned for implementation Apr 26, 2019
+ DietPi-Image | Minor fixes and argument reorder
@MichaIng MichaIng modified the milestones: Planned for implementation, v6.25 May 15, 2019
…ng the partition and there is no way to pre-answer this question with "-s" + minor
@Fourdee
Copy link
Collaborator

Fourdee commented May 29, 2019

@MichaIng
Doing a re-write, will commit later.

ToDo:

  • GPT test
  • No partition table implementation (NanoPC T4)?

Root partition as ALWAYS the last partition, right?

In my experience yes, however, could not be the case with custom setups. We should cover all options.

@Fourdee
Copy link
Collaborator

Fourdee commented May 29, 2019

committed directly to dev:
https://github.com/MichaIng/DietPi/blob/dev/.meta/dietpi-imager

@MichaIng
Copy link
Owner Author

MichaIng commented May 29, 2019

Prefect. Will mark this PR as closed then.

AFAIK, no partition table should not be possible. Single partition jep, but boot always requires MBR or GPT, doesn't it?


Perhaps we can simply take the largest partition as root partition 😎?
Or we list the partitions, similar to how we list the available drives, to let choose it.

Also environment variables would be great to allow automated run. Will do some commit after DietPi-Services finished.

@MichaIng MichaIng closed this May 29, 2019
@MichaIng MichaIng deleted the dietpi-image branch May 29, 2019 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Installer 💠 Issues related to DietPi-Installer and/or pre-image used META Everything that is not code related, e.g. GitHub, Wiki, website, community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants